
#include <stdio.h>

extern "C" 
{
#include "quicklz.h"
}


const int SIZE = 4096;


int main()
{
	char src[SIZE+8];
	char dst[SIZE+400];
	char buf1[QLZ_SCRATCH_COMPRESS];
	char buf2[QLZ_SCRATCH_DECOMPRESS];
	size_t ret;

	for (int i=0; i<SIZE; i++)
	{
		src[i]  = '0' + i%10;
	}

	printf("original size %u\n", SIZE);

	ret = qlz_compress(src, dst, SIZE, buf1);
	printf("compress size %u\n", ret);

	ret = qlz_decompress(dst, src, buf2);
	printf("decompress size %u\n", ret);

	return 0;
}
